#!/usr/bin/env python
ident = '$Id: ede.py 109 2006-06-05 18:46:37Z trevor $'
import sys, os, wx
import wx.lib.colourdb
import common
import rex
import sui
import wxversion
print wxversion.getInstalled()
# Modify the path
sys.path.append(".")
os.environ['LANG']="en_US"

class MySplashScreen( wx.SplashScreen ):
	def __init__(self):
		#common.set_busy_info( common.version_number )
		bmp = None
		bmp = sui.images.getProSplashBitmap()
		wx.SplashScreen.__init__(self, bmp,
			wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, 2500, None, -1,
			style = wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP)
		self.Bind( wx.EVT_CLOSE, self.OnClose )
		msg = "version %s\nbuild %s" %( common.version_number, common.build_number )
		self.text = wx.StaticText( self.GetSplashWindow(), -1, msg, (320,160) )

	def OnClose(self, evt):
		# Open up the account manager
		self.Show( False )
		#common.clear_busy_info()
		acc_man	= sui.account_manager( None, -1, "Etelos Development Environment" )
		acc_man.Show( True )
		evt.Skip()  # Make sure the default handler runs too...

# are we debugging?
try:	common.debugging = ( sys.argv[1] == 'debug')
except:	pass
# Start the app
ede_app= wx.PySimpleApp()
wx.lib.colourdb.updateColourDB()
# Show the splash screen
splash = MySplashScreen()
splash.Show()
#sui.icon_manager.editors_image_list = sui.icon_manager.get_editors_image_list()
# Start the loop
ede_app.MainLoop()
